<template>
	<view class="container">
		<view class="form">
			<view class="form-item row">
				<view class="label"><text>物流公司</text></view>
				<view class="form-content">
					<view class="select-input" @click="selectGS">
						<input type="text" v-model="value" disabled placeholder="请输入或选择物流公司" placeholder-class="p-inp" />
						<image :src="$img_path('/mine/r_img.png')" mode="widthFix"></image>
					</view>
				</view>
			</view>
			<view class="form-item row">
				<view class="label"><text>物流单号</text></view>
				<view class="form-content">
					<view class="input">
						<input type="text" placeholder="请输入物流单号" placeholder-class="p-inp" />
					</view>
				</view>
			</view>
			
			<view class="form-item row">
				<view class="label"><text>物流说明</text></view>
				<view class="form-content">
					<view class="input">
						<input type="text" placeholder="请输入物流说明" placeholder-class="p-inp" />
					</view>
				</view>
			</view>
			
			<view class="form-item column">
				<view class="label">
					<text>上传凭证</text>
					<text>上传物流单号凭证，最多3张</text>
				</view>
				<view class="form-content">
					<view class="upload">
						<view class="u-box">
							<image class="del-icon" :src="$img_path('/course/city_1.png')" mode="widthFix"></image>
							<image class="z-img" :src="$img_path('/mall/5.png')" mode="aspectFill"></image>
						</view>
						<view class="u-box">
							<image class="u-icon" :src="$img_path('/pagesMine/16.png')" mode="widthFix"></image>
						</view>
					</view>
				</view>
			</view>
			
			
			<view class="btn">
				<button>提交</button>
			</view>
		</view>
		
		<popupBox ref="selectGS" :isSlot="true" type="bottom">
			<view class="s-con">
				<view class="title">
					选择快递商
				</view>
				
				<view class="list">
					<view class="item" v-for="(item,i) in GS_list" :key="i" @click="value = item.text">
						{{item.text}}
					</view>
				</view>
				
				<view class="cancel">
					取消
				</view>
			</view>
		</popupBox>
	</view>
</template>

<script>
	import popupBox from '@/components/popup/popup.vue';
	export default {
		components:{
			popupBox
		},
		data() {
			return {
				value:'',
				GS_list:[
					{
						text:'顺丰快递',
						value:1
					},
					{
						text:'邮政EMS',
						value:2
					},
					{
						text:'圆通快递',
						value:3
					},
					{
						text:'申通快递',
						value:4
					},
					{
						text:'韵达快递',
						value:5
					},
					{
						text:'其他快递',
						value:6
					},
				]
			};
		},
		
		methods:{
			selectGS(){
				this.$refs.selectGS.open()
			}
		}
	}
</script>
<style>
	page{
		background-color: #FFFFFF;
	}
</style>
<style lang="scss" scoped>
.container{
	.form{
		padding: 10rpx 0 0;
		.form-item{
			padding: 26rpx 22rpx;
			box-sizing: border-box;
			display: flex;
			border-bottom: 2rpx solid #EEEEEE;
			&.row{
				align-items: center;
				justify-content: space-between;
				.label{
					width: 150rpx;
					text{
						font-weight: bold;
						font-size: 32rpx;
						color: #333333;
						line-height: 44rpx;
					}
				}
				.form-content{
					width: calc(100% - 150rpx);
					.select-input{
						display: flex;
						align-items: center;
						input{
							flex: 1;
							text-align: right;
							/deep/ .p-inp{
								font-weight: 400;
								font-size: 32rpx;
								color: #B4B4B4;
								line-height: 44rpx;
							}
						}
						image{
							width: 11rpx;
							height: 19rpx;
							margin-left: 22rpx;
						}
					}
					.input{
						input{
							flex: 1;
							text-align: right;
							/deep/ .p-inp{
								font-weight: 400;
								font-size: 32rpx;
								color: #B4B4B4;
								line-height: 44rpx;
							}
						}
					}
				}
			}
			&.column{
				flex-direction: column;
				.label{
					width: 100%;
					display: flex;
					align-items: flex-end;
					text:nth-child(2){
						font-weight: 400;
						font-size: 24rpx;
						color: #B4B4B4;
						line-height: 34rpx;
					}
				}
				.form-content{
					width: 100%;
					.upload{
						width: 100%;
						display: flex;
						flex-wrap: wrap;
						.u-box{
							width: 138rpx;
							height: 138rpx;
							display: flex;
							align-items: center;
							justify-content: center;
							background: #F2F2F2;
							border-radius: 20rpx;
							position: relative;
							margin-right: 20rpx;
							margin-top: 20rpx;
							.u-icon{
								width: 60rpx;
								height: 54rpx;
							}
							.z-img{
								width: 100%;
								height: 100%;
								border-radius: 20rpx;
							}
							.del-icon{
								width: 40rpx;
								height: 40rpx;
								position: absolute;
								right: 0;
								top: 0;
								transform: translateY(-50%) translateX(50%);
							}
						}
					}
				}
			}
		}
		
		.btn{
			width: 100%;
			margin-top: 88rpx;
			padding: 0 22rpx;
			box-sizing: border-box;
			button{
				width: 100%;
				height: 96rpx;
				background: linear-gradient( 135deg, #FFA233 0%, #FB4C4C 100%);
				border-radius: 80rpx;
				font-weight: bold;
				font-size: 32rpx;
				color: #FFFFFF;
				line-height: 96rpx;
			}
		}
	}
}

.s-con{
	padding: 8rpx 0 0;
	.title{
		font-weight: bold;
		font-size: 32rpx;
		color: #000000;
		line-height: 44rpx;
		padding: 30rpx 0;
		text-align: center;
		border-bottom: 2rpx solid rgba(112, 112, 112, 0.1);
	}
	.list{
		.item{
			font-weight: bold;
			font-size: 30rpx;
			color: #333333;
			line-height: 42rpx;
			padding: 30rpx 0;
			text-align: center;
			border-bottom: 2rpx solid rgba(112, 112, 112, 0.1);
		}
	}
	.cancel{
		border-top: 20rpx solid rgba(153, 153, 153, 0.1);
		padding: 30rpx 0;
		font-weight: bold;
		font-size: 30rpx;
		color: #FF4A4A;
		line-height: 42rpx;
		text-align: center;
	}
}
</style>
